/**
 * [KtImgLoad 监听图片加载]
 * @param thisObj
 * @constructor
 */
function KtImgLoad(thisObj){
    // 获取图片宽高
    var imgObj = new Image();
    imgObj.src = thisObj.src;
    var width = imgObj.width;
    var height = imgObj.height;

    if(width >= height){

        thisObj.setAttribute('height','100%');
        thisObj.setAttribute('width','unset');
    }else{
        thisObj.setAttribute('width','100%');
        thisObj.setAttribute('height','unset');
    }
}


/**
 * [KtImgError 监听图片出错]
 * @param thisObj
 * @constructor
 */
function KtImgError(thisObj) {
    thisObj.src = '/html/images/notfound.png';
}